package com.useeinfo.oa.common.exception;

import org.springframework.http.HttpStatus;

/**
 * 通用的异常处理类
 *
 * @author GeniusJ
 * @email 975473185@qq.com
 * @date 2017-11-17
 * @time 16:42
 */
public class MyException extends RuntimeException {

    private String msg;

    private HttpStatus resultEnums = HttpStatus.INTERNAL_SERVER_ERROR;

    public MyException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public MyException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public MyException(String msg , HttpStatus resultEnums) {
        super(msg);
        this.msg = msg;
        this.resultEnums = resultEnums;
    }

    public MyException(String msg , Throwable e,HttpStatus resultEnums) {
        super(msg,e);
        this.msg = msg;
        this.resultEnums = resultEnums;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public HttpStatus getResultEnums() {
        return resultEnums;
    }

    public void setResultEnums(HttpStatus resultEnums) {
        this.resultEnums = resultEnums;
    }
}
